Trappable errors can occur while an execution is in progress. Some of these can also occur during compilation. At run time you can test and respond to trappable errors using the On Error statement and the Err function.
The following table lists trappable error messages and their detailed descriptions. Error number(#) is the value used to trap or return the error at run time.
# | Message | Description |
1 | parser_message | Occurs during compile time. |
2 | Syntax error | ╬ccurs during compile time. |
3 | Return without GoSub | ╬ccurs during run time. |
4 | Too many parameters in method or procedure 'procname' call | ╬ccurs during compile time. |
5 | Illegal method or procedure 'procname' call | ╬ccurs during compile time. |
6 | Overflow | |
7 | Out of memory | |
8 | Symbol 'symbol' is not a constant. Constant is required | ╬ccurs during compile time. |
9 | Subscript out of range or missing | |
10 | Duplicate definition 'symbol' | ╬ccurs during compile time. |
11 | Division by zero | |
12 | Expected function or variable | ╬ccurs during compile time. |
13 | Type mismatch | |
14 | Out of string space | |
15 | Can't allocate symbol 'symbol' | |
16 | Expression too complex | |
17 | Can't perform requested operation | |
18 | User interrupt occurred | |
19 | No Resume | |
20 | Resume without error | |
21 | Invalid event definition | |
22 | Invalid event param declaration | |
23 | Undefined label 'labelname' | |
24 | Assignment isn't permitted | |
25 | Undefined symbol 'symbol' | |
26 | Can't create object 'object' | |
27 | Statement 'statement' without 'Sub' ('Sub' is missing) | |
28 | Out of stack space | |
29 | Statement 'statement' without 'For' ('For' is missing) | |
30 | Statement 'statement' without 'Do' ('Do' is missing) | |
31 | Statement 'statement' without 'While' ('While' is missing) | |
32 | Illegal statement 'statement' after beginning of procedure ('End Sub' or 'End Function' is missing) | |
33 | Symbol 'symbol' declaration without begriming of procedure ('Sub' or 'Function' is missing) | |
34 | Object 'object' not an array | |
35 | Sub or Function not defined | |
36 | Statement 'statement' without 'Function' ('Function' is missing) | |
37 | Undefined method or property 'name' | |
38 | Property 'name' is write-only | |
39 | Property 'name' is read-only | |
40 | Property 'name' is not found | |
41 | Can't open include 'filename' or recycling include | |
42 | Invalid object type 'symbol' | |
43 | Can't define Function 'procname' | |
44 | Can't define Sub 'procname' | |
45 | Invalid object reference | |
46 | Too many external library application clients | |
47 | Too many external library application clients | |
48 | Error in loading external library 'name' | |
49 | Bad external library calling convention | |
50 | Specified external library procedure 'procname' not found | |
51 | Internal error | |
52 | Bad file name or number | |
53 | File not found | |
54 | Bad file mode | |
55 | File already open | |
57 | Device I/O error | |
58 | File already exists | |
59 | Bad record length | |
61 | Disk full | |
62 | Input past end of file | |
63 | Bad record number | |
64 | Bad file name | |
67 | Too many files | |
68 | Device unavailable | |
69 | Procedure param 'param' re-declaration (type mismatch) | |
70 | Permission denied | |
71 | Disk not ready | |
74 | Can't rename with different drive | |
75 | Path/File access error | |
76 | Path not found | |
77 | 'Else' or 'End If' are missing | |
78 | 'End If' is missing | |
79 | 'Next' is missing | |
80 | 'Loop' is missing | |
81 | 'Wend' is missing | |
82 | 'End Sub' is missing | |
83 | 'End Function' is missing | |
84 | 'End Select' is missing | |
90 | Database error: message | |
91 | Object variable not set | |
92 | For loop not initialized | |
93 | Invalid pattern string | |
94 | Invalid use of Null |